Conventionally, there exist storage systems which absorb a difference between the processing speed of a host computer and the processing speed of a storage device through the insertion of a cache memory, which is a volatile memory, in data transfers between the host computer and the storage device.
Typically, a storage system is configured comprising a controller and a storage device for storing data which are connected to the host computer. Upon receiving a data write request and write data from the host computer, the controller writes the write data in the cache memory and transmits a write completion notification (ACK) to the host computer. Thereafter, the controller transfers write data which is written in the cache memory to the storage device asynchronously to I/Os from the host computer.
Meanwhile, upon receiving a read request from the host computer, the controller does not access the storage device if the read data is stored in the cache memory, and reads the read data from the cache memory and transfers the read data to the host computer. The controller reads read data from the storage device and transfers this data to the host computer only in cases where read data is not stored in the cache memory.
In a storage system, control is performed such that, by using a cache memory in the foregoing manner, the processing speed of the storage device has no impact on the tasks of the host computer even in a case where the processing speed of the storage device is slow in comparison with the processing speed of the host computer.
Here, upon receiving the ACK from the controller, the host computer determines that data has been written in the storage device without problems and erases the write data from the memory in the host computer. However, in reality, in a case where the power of the storage system is disconnected for whatever reason during the period when the data transfer from the cache memory in the controller to the storage device is still incomplete, the write data which has been written in the cache memory is lost. Even when the power supply is restored, the lost write data is difficult to reproduce.
Therefore, as one example of a countermeasure to protect write data which has been written in the cache memory, there exists a data saving method for saving data to a non-volatile memory (see PTL 1 and PTL 2).
PTL 1 and PTL 2 disclose a method in which write data which has been written in a cache memory, which is volatile memory, is saved to non-volatile memory upon a power outage, and the write data which has been saved to the non-volatile memory is restored to the cache memory when power is restored. This method makes it possible to prevent loss of write data which has been written in a cache memory upon a power outage, but which has not yet been written in the storage device.